package GameFiles;

public class Days {
	public static final int STARTDAY = 0;
	public static final int MAILDAY = 1;
	public static final int EVENTDAY = 2;
	public static final int DEALDAY = 3;
	public static final int LOTTERYDAY = 4;
	public static final int BUYERDAY = 5;
	public static final int BIRTHDAY = 6;
	public static final int YARDSALEDAY = 7;
	public static final int PAYDAY = 8;
	public static final int NUM_DAYTYPES = 9;

	private int DayType;
	private String DayName;
	private Integer Value;
	
	public Days(int dayType, int Value ){
		setDayType( dayType );
		setValue(Value);
	}

	public void setDayType(int dayType) {
		DayType = dayType;
		setDayName(dayType);
	}

	public void setDayName(int dayType) {
		switch (dayType) {
		case STARTDAY:
			DayName = "Start.";
			break;
		case MAILDAY:
			DayName = "You got mail!";
			break;
		case EVENTDAY:
			DayName = "Event.";
			break;
		case DEALDAY:
			DayName = "Wanna buy a deal?";
			break;
		case LOTTERYDAY:
			DayName = "Lottery.";
			break;
		case BUYERDAY:
			DayName = "You found a buyer!";
			break;
		case BIRTHDAY:
			DayName = "Happy Birthday!";
			break;
		case YARDSALEDAY:
			DayName = "Yardsale";
			break;
		case PAYDAY:
			DayName = "Pay Day!";
			break;
		case NUM_DAYTYPES:
		default:
			DayName = "None.";
			break;
		}
	}

	public int getDayType() {
		return DayType;
	}

	public void setValue(int value) {
		Value = value;
	}

	public Integer getValue() {
		return Value;
	}

	public void setDayName(String dayName) {
		DayName = dayName;
	}

	public String getDayName() {
		return DayName;
	}
	
	@Override
	public String toString(){
		String outstring = getDayName();
		if ( DayType == MAILDAY ){
			outstring += " " + Value.toString() + " Pieces.";
		}
		return outstring;
	}
}
